|
This page last changed on Jul 14, 2010 by kgomes.
Goal
The goal of this work was to integrate the QTKit Framework into Java so that the VARS application could access video sources for frame capture. This was necessary as Apple discontinued Quicktime for Java (that was nice of them) as well as the Java-Cocoa bridge and VARS thus won't work in OS X 10.6.
Background
First let me give you a listing of resources that I found helpful during this work:
- If you are unfamiliar with Mac OS X architecture, check out Apple's Technology Overview
- For a quick primer on Objective-C look at Apple's Objective-C Primer or get a good book
- For an overview of the Cocoa Framework look at Cocoa Fundamentals Guide
- For information about the QuickTime Kit Framework, look at QTKit Application Tutorial
- Then for programming information for QT Kit is available in the QTKit Appplication Programming Guide
- For JNI Development, I used the following resources:
- Sun's Book on JNI(PDF) was very helpful for background on how JNI works with C (does not have any Cocoa/OS X information however).
- The JNI Development on Mac OS X page is a great resource in seeing how JNI works with some of the OS X Objective-C frameworks.
- If you start up XCode and create a new project and tell it to create a JNI library, it will create an example project for accessing the OS X address book through a Java GUI. I found this to be key in understanding how the JNI-Objective-C bridge works.
- Finally, the Java Native Foundation Functions Reference was important in seeing what functions could be called on the Java Native Foundation framework in OS X.
 | Bailed on Rococoa
Originally, we started to look at the Rococoa project. While it had some capability of creating Java Objects that were representations (proxies) for Objective-C objects, it was more than what we really needed, was complicated, and did not have good support of QTKit. We worked at getting that to operate correctly, but it was seen as a hassle that would be difficult to maintain. Since the model seemed to be more of just being able to call functionality in the Cocoa/QTKit frameworks, JNI seemed to be a more logical and straightforward way to do things. We abandoned the Rococoa stuff and went straight to JNI. |
Getting it to work and how to develop
 | requirements
You will need to have a Mac running 10.6 with some sort of video capture device (like built in iSight) to make this work |
- Check out the qtimagesnap project from SVN.
- Start up XCode
- Open up the Xcode project in src/xcode
- Start up Eclipse
- Import an existing Java project from the base project directory
|